export function getCheckedMenuIds(arr, ids) {
    ids = ids || []
    arr.forEach(item => {
        (item.id || item.id == 0) && ids.push(item.id)
        item.children && getCheckedMenuIds(item.children, ids)
    })
    return ids
}

export function returnName(code, dataList, value, label){
    // value  自定义的value
    // label  自定义的label
    let mValue = value || 'value';
    let mLabel = label || 'label';
    let obj = dataList&&dataList.find((v, i)=>{
        return code == v[mValue];
    })
    return obj&&obj[mLabel];
}